/*
 *	Perlin Production Co. Ltd. September 2012 (c).
 *			paramlib.h
 */
 
#define	IP_VERBOSE	0	/* verbosity */

#define	VERBMIN		0
#define	VERBDEF		1
#define	VERBMAX		2
 
struct	intparm
{
	char	ip_key;
	int	ip_rep; /* 0 to avoid multiple value redefinitions */
	int	ip_min;
	int	ip_val;	 /* defaul value originally */
	int	ip_max;
	char	*ip_name;
};
#define INTPARM struct intparm


/*
InitParm(_ip, _key, _min, _val, _max, _name)
INTPARM* _ip;
char	_key;
int	_min;
int	_val;
int	_max;
char	*_name;


int	ArgInt(_value, _min, _max, _name)
char*	_value;
int	_min;
int	_max;
char*	_name;


OptParm(_argv, _argb, _argc, _param, _numparm, _verbose)
char		**_argv;
int		_argb;
int		_argc;
INTPARM		*_param;
unsigned	_numparm;
INTPARM		*_verbose;

-- EXAMPLES

-- Known parameters

if (argc < NPARAM) banner("invalid number of required parameters");
width	= ArgInt(argv[PI_WDT], 1, MAXSW, "sprite width");
height	= ArgInt(argv[PI_HGT], 1, MAXSH, "sprite height");

-- Optional parameters

#define	NUM_IP	4
INTPARM	params[NUM_IP];
ip = params;
InitParm(ip++, 'p', 1, DEFPHS	, MAXPHS, "image phases");
InitParm(ip++, 'd', 1, DEFSD	, MAXSD	, "sprite depth");
InitParm(ip++, 'i', 0, DEFINV	, 1	, "bitmap inversion mode");
InitParm(ip++, 'm', 0, 0	, 1	, "bitmap mirror");

OptParm(argv, NPARAM, argc, params, NUM_IP); 

*/
